<template>
  <div>
    <div @click="Opne()">我的课表功能页面</div>
    <ul>
      <li v-for="(val,index) in item" :key="index">{{val.title}} -- {{val.content}}</li>
    </ul>
  </div>
</template>
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { Index } from "./models";
import { Show } from "./models/data";

@Component({
  layout: "menu",
  async asyncData({ app }) {
    return await app.$axios("/new/modules").then(res => {
      if (res && res.data.data) {
        console.log(Show(res.data.data));
        return {
          item: res.data.data
        };
      }
    });
  },
  fetch() {}
})
export default class MyCchedule extends Vue {
  msg: string = "3";
  item: Index[] = [];

  Opne(): void {
    alert(66);
  }
}
</script>
<style lang="less" scoped>
</style>
